Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add active content warning in jQuery mode #467

Merged
merged 1 commit into from
Jan 14, 2019

Conversation

Jaifroid
Copy link
Member

This is a first go at addressing #466. I have backported the UI features and detection of the active content warning from Kiwix JS Windows. It intelligently detects an unsupported UI and puts a yellow Bootstrap alert-warning just below the search box. The alert is only shown on the landing page (otherwise it would become very annoying), and is removed when the user presses Config or searches for articles. By default, it will appear again whenever the user goes back to a landing page with active content.

The alert can be dismissed temporarily (with the x) or permanently. Hyperlinks to the appropriate settings on the Config page are provided (to activate SW mode, and to hide the warning permanently), and these hyperlinks jump to (and highlight) the setting the user needs to activate. The highlighting feature is backported from Kiwix JS Windows where it is maybe more useful because there are a lot more options that can be confusing. However, it still seems useful here, and educates the user about the Config settings. It also will become more useful as display settings are added.

I've taken the liberty of including a small bit of related code that is part of the same UI feature set in Kiwix JS Windows. It responsively changes the colour of the API status panel from yellow panel-warning (when the SW API is unavailable or unregistered) to green panel-success when the SW API is available and registered. I think this makes things clearer for the user and is aesthetically pleasing.

@Jaifroid
Copy link
Member Author

@mossroy I've now tested and debugged this PR in Edge, Firefox ESR, FFOS Simulator, Chromium 66, and IE11 on Windows. It's ready for review.

@mossroy
Copy link
Contributor

mossroy commented Jan 11, 2019

I quickly tested on Firefox 60 ESR and Chrome 71 : it worked very well !
I really like the highlighting feature, and also the changing colors of the API panel.
I'll have a look at the code

@Jaifroid
Copy link
Member Author

@mossroy I believe remaining issues with this PR are either resolved or pushed to the two new issues I have created. Let me know, by approving the PR, whether it's ready to be squashed/merged.

Copy link
Contributor

@mossroy mossroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this can be squashed/rebased/merged

@Jaifroid Jaifroid force-pushed the Show-active-content-warning-in-jQuery-mode branch from e179c98 to 58c2d2b Compare January 14, 2019 06:33
@Jaifroid Jaifroid merged commit e595a49 into master Jan 14, 2019
@Jaifroid Jaifroid deleted the Show-active-content-warning-in-jQuery-mode branch January 14, 2019 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants